package com.tebiecloud.act.client.service;

import com.tebiecloud.act.client.model.entity.Act;
import com.tebiecloud.act.client.model.entity.ActGiftPack;
import com.tebiecloud.act.client.model.vo.ActInfoVO;
import com.tebiecloud.act.client.model.vo.ActInfoVO2;
import com.tebiecloud.act.client.model.vo.ActListVO;
import com.tebiecloud.common.model.ResultBody;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * 活动公共接口
 */
public interface IActServiceClient {

    /**
     * 获取可购买的活动基础信息
     * @param actId //活动id
     * @param goodsSpecificationId //规格id
     * @return
     */
    @PostMapping("/feign/act/infoActInfoVO2ForBuy")
    ResultBody<ActInfoVO2> getActInfoVO2ForBuy(@RequestParam("actId") long actId,
                                               @RequestParam("goodsSpecificationId") long goodsSpecificationId);

    /**
     * 更新库存数量
     * @param actId 活动id
     * @param goodsSpecificationId 爆品活动时，指定规格id
     * @param amount 正数为加库存，负数为减库存
     * @return
     */
    @PostMapping("/feign/act/updateStockQty")
    ResultBody updateStockQty(@RequestParam("actId") long actId,
                              @RequestParam("goodsSpecificationId") long goodsSpecificationId,
                              @RequestParam("amount") int amount);

    /**
     * 根据活动id和商品id获取信息
     * @param actId
     * @param goodsId
     * @return
     */
    @PostMapping("/feign/act/selectActByActIdAndGoodsId")
    ResultBody<ActListVO> selectActByActIdAndGoodsId(@RequestParam("actId") long actId,
                                                     @RequestParam("goodsId") long goodsId);

    /**
     * 根据活动id获取活动信息
     * @param actId
     * @return
     */
    @PostMapping("/feign/act/selectActByActId")
    ResultBody<Act> selectActByActId(@RequestParam("actId") long actId);

    /**
     * 根据活动id获取活动价格
     * @param actId
     * @return
     */
    @PostMapping("/feign/act/selectActGift")
    ResultBody<ActGiftPack> selectActGift(@RequestParam("actId") long actId);

}
